package com.orange.example.controller;

import com.orange.common.utils.HttpUtils;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UtilsController {

    /**
     * @Description: 测试http工具类
     * (测试成功
     * 结果为；Hello World调用成功
     * )
     */
    @GetMapping("test/http")
    public String testHttp(){
        String s = HttpUtils.httpGet("http://localhost:8080/test");
        return s+"调用成功";
    }
}
